$(function () {
    $('header a').eq(0).addClass('head_bg_active');

    //信息回显
    $.ajax({
        datatype: 'json',
        url: 'data/index.json',
        data: {},
        type: 'get',
        success: function (data) {
            if (data.code == '200') {
                //工作动态 回显
                var xxgs = data.noList;
                $.each(xxgs, function (index, ele) {
                    if (index == xxgs.length - 1) {//最后去掉boder-bottom
                        $('#worktrends3').append('  <li class="borbom_none"> ' +
                            '<i></i> <a href="imgTestDetail.html?id=' + ele.id + '" target="_blank" title="' + ele.titile + '">' + ele.titile + ' </a>' +
                            '<span>' + ele.vopublishdate + '</span></li>')

                    } else {
                        $('#worktrends3').append('  <li> ' +
                            '<i></i> <a href="imgTestDetail.html?id=' + ele.id + '" target="_blank" title="' + ele.titile + '">' + ele.titile + ' </a>' +
                            '<span>' + ele.vopublishdate + '</span></li>')
                    }
                })

                //信息公示 回显
                var xxgs = data.noList;
                $.each(xxgs, function (index, ele) {
                    if (index == xxgs.length - 1) {//最后去掉boder-bottom
                        $('#worktrends1').append('  <li class="borbom_none"> ' +
                            '<i></i> <a href="imgTestDetail.html?id=' + ele.id + '" target="_blank" title="' + ele.titile + '">' + ele.titile + ' </a>' +
                            '<span>' + ele.vopublishdate + '</span></li>')

                    } else {
                        $('#worktrends1').append('  <li> ' +
                            '<i></i> <a href="imgTestDetail.html?id=' + ele.id + '" target="_blank" title="' + ele.titile + '">' + ele.titile + ' </a>' +
                            '<span>' + ele.vopublishdate + '</span></li>')
                    }
                })

                //规章制度 回显
                var xxgs = data.noList;
                $.each(xxgs, function (index, ele) {
                    if (index == xxgs.length - 1) {//最后去掉boder-bottom
                        $('#worktrends4').append('  <li class="borbom_none"> ' +
                            '<i></i> <a href="imgTestDetail.html?id=' + ele.id + '" target="_blank" title="' + ele.titile + '">' + ele.titile + ' </a>' +
                            '<span>' + ele.vopublishdate + '</span></li>')

                    } else {
                        $('#worktrends4').append('  <li> ' +
                            '<i></i> <a href="imgTestDetail.html?id=' + ele.id + '" target="_blank" title="' + ele.titile + '">' + ele.titile + ' </a>' +
                            '<span>' + ele.vopublishdate + '</span></li>')
                    }
                })

                //通知公告 回显
                var tzgg = data.noList;
                $.each(tzgg, function (index, ele) {
                    var title = ele.titile;
                    if (ele.titile.length > 37) {
                        ele.titile = ele.titile.substring(0, 37);
                        ele.titile += '...';
                    }

                    $('.infoList').append('<li>' +
                        '<i></i> <a href="imgTestDetail.html?id=' + ele.id + '" target="_blank" title="' + title + '">' + ele.titile + ' </a>' +
                        '<span>' + ele.vopublishdate + '</span></li>')


                })
                jQuery(".txtMarquee-top").slide({
                    mainCell: ".bd1 ul",
                    autoPlay: true,
                    effect: "topMarquee",
                    vis: 5,
                    interTime: 50,
                    trigger: "click"
                });

                //投诉信息 回显
                var xxgs = data.noList;
                $.each(xxgs, function (index, ele) {
                    if (index == xxgs.length - 1) {//最后去掉boder-bottom
                        $('#worktrends7').append('  <li class="borbom_none"> ' +
                            '<i></i> <a href="imgTestDetail.html?id=' + ele.id + '" target="_blank" title="' + ele.titile + '">' + ele.titile + ' </a></li>')

                    } else {
                        $('#worktrends7').append('  <li> ' +
                            '<i></i> <a href="imgTestDetail.html?id=' + ele.id + '" target="_blank" title="' + ele.titile + '">' + ele.titile + ' </a></li>')
                    }
                })

            }


        },
        error: function () {

        }
    })


})
